package Shapes;

public class TestShape {

    public static void main1(String[] args) {
        Cycle cycle1 = new Cycle();
        Rect rect1 = new Rect();

        String[] arr = {"cycle", "rect", "cycle", "rect"};

        for(String x : arr) {
            if(x.equals("cycle")) {
                cycle1.draw();
            } else if(x.equals("rect")) {
                rect1.draw();
            }
        }
    }

    public static void main11(String[] args) {
        Shape[] arr = {new Cycle(), new Rect(), new Cycle(), new Rect()};
        for(Shape x : arr) {
            x.draw();
        }
    }

    public static void main111(String[] args) {
        Cycle cycle1 = new Cycle();
        Rect rect1 = new Rect();

        String[] arr = {"cycle", "rect", "cycle", "rect"};

        for(String x : arr){
            if(x.equals("cycle")) {
                cycle1.draw();
            } else if(x.equals("rect")) {
                rect1.draw();
            }
        }
    }

    public static void main(String[] args) {
        Cycle cycle1 = new Cycle();
        Rect rect1 = new Rect();

        Shape[] arr = {cycle1, rect1, cycle1, rect1};

        for(Shape x : arr) {
            x.draw();
        }
    }
}
